//
//  WHYHomeWebViewController.swift
//  WHYWeibo-1.0
//
//  Created by 王洪运 on 15/12/10.
//  Copyright © 2015年 王洪运. All rights reserved.
//

import UIKit

class WHYHomeWebViewController: UIViewController {

 /// url
    private var url: NSURL
 /// webView
    private lazy var webView: UIWebView = UIWebView()

//    MARK: - 构造函数
    init(url: NSURL) {
        self.url = url
        
        super.init(nibName: nil, bundle: nil)
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func loadView() {
        webView.backgroundColor = UIColor.whiteColor()
        view = webView
        
        title = "网页"
        
    }

    override func viewDidLoad() {
        super.viewDidLoad()
        
        webView.loadRequest(NSURLRequest(URL: url))
    }
    
}
